@charset "utf-8";

body{
	margin: 0;
	padding: 0;
}
/*
	结构性伪类选择器
*/
:root{
	border: 1px solid red;
}

ul > li:first-child{
	color: green;
}

ul > li:last-child{
	color: red;
}

ul > li:only-child{
	color: blue;
}

div > p:only-of-type{
	color: orange;
}

ul > li:nth-child(2){
	color: yellow;
}

ul > li:nth-last-child(2){
	color: blue;
}

div > p:nth-of-type(2){
	color: green;
}

div > p:nth-last-of-type(2){
	color: red;
}

/*
	UI 伪类选择器
*/
input:enabled{
	/*border: solid 1px blue;*/
}

input:disabled{
	/*border: solid 1px red;*/
}

input:checked{
	/*display: none;*/
}

input:default{
	display: none;
}

input:valid{
	/*border: 3px solid blue;*/
}

input:invalid{
	/*border: 3px solid red;*/
}

input:required{
	border: 2px solid blue;
}

input:optional{
	border: 2px solid green;
}

/*
	动态伪类选择器
*/
a:link{
	color: red;
}

a:visited{
	color: orange;
}

a:hover{
	color: green;
}

a:active{
	color: blue;
}

input:focus{
	border: solid 3px black; 
}
/*
	其它伪类选择器
*/
a:not([href*="baidu"]){
	color: blue;
}

p:empty{
	display: none;
}

:lang(en){
	color: green;
	font-size: 40px;
}

:target{
	color: red;
}

::selection{
	color: red;
}

